﻿@using Step4.Unit8.Modules
@model UserEditViewModel
@{
    ViewData["Title"] = "Edit";
}

<h1>编辑用户</h1>
<form asp-action="Submit" method="post">
    <input type="hidden" asp-for="Id" />
    <div asp-validation-summary="ModelOnly"></div>
    <div>
        <label asp-for="UserName"></label>
        <input asp-for="UserName" />
        <span asp-validation-for="UserName"></span>
    </div>
    <div>
        <label asp-for="Email"></label>
        <input asp-for="Email" />
        <span asp-validation-for="Email"></span>
    </div>
    <div>
        <label asp-for="RoleName"></label>
        <select asp-items="ViewBag.RoleList" asp-for="RoleName">
            <option value="">请选择</option>
        </select>
        <span asp-validation-for="RoleName"></span>
    </div>
    <div>
        <input type="submit" class="btn btn-primary" value="提交" />
    </div>
</form>

@section Scripts
{
    <partial name="_ValidationScriptsPartial" />
}